Data storage methods and systems

ABSTRACT

A data storage method includes partitioning a data into an array having a plurality of data blocks and storing the data blocks across a plurality of storage nodes. Parity blocks are encoded based on the data array by performing a shift operation on the data array to produce a shifted array and performing an exclusive OR (XOR) operation on the elements in each row of the shifted array to produce a parity block. The method further includes storing the parity blocks across a plurality of the storage nodes. Systems are configured to recover data from a data array in the event that the data array is at least partly inaccessible.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a non-provisional filing of and claimspriority to U.S. Provisional Patent Application 62/799,634, titled“Efficient method for tolerating multiple failures of storage nodes” andfiled on Jan. 31, 2019, which is incorporated herein by reference in itsentirety.

FIELD

The present invention relates to data storage methods and systems. Thepresent invention more particularly relates to distributed data storagemethods and systems which allow data to be recovered in the event thatthere is a failure in one or more of the storage nodes.

BACKGROUND

Due to the unprecedented ever-growing amounts of generated data,computer systems that employ multiple storage nodes (such as in discarrays or networked storage servers) for data storage are more popularthan ever. Typically, these systems partition data into blocks and storethese blocks over multiple storage nodes. When storing and processinghuge amounts of data, striping data over independent storage nodes isnot only mandatory but also has performance advantages.

In addition, more users are relying on the cloud to store their data.This makes data confidentiality and integrity critical requirements.However, relying on a single cloud storage provider fails to meet theserequirements due to the inevitable risks of privacy, data leaks, andservice failures. Thus, various multi-cloud storage systems are beingproposed both in academia and in industry. Such systems may also offerperformance and high-availability advantages.

However, a storage node or a cloud storage provider is often subject tooccasional loss or service failure. Thus, the utilization of multiplestorage nodes or multiple cloud storage providers has severe reliabilityand data availability implications since the unavailability of anyparticipating node would prevent successful data access.

Computer systems that employ multiple parallel storage nodes for theirdata storage needs are known. These systems partition data into blocksand store these blocks over multiple storage nodes. However, nodes areoften subject to occasional loss or corruption. The utilization ofmultiple storage nodes has severe reliability and data availabilityimplications since the unavailability of any participating node wouldprevent successful data access. Therefore, as the number of storagenodes in a system increases, the failure frequency also increases.

There is a need for improved data storage methods and systems which seekto alleviate at least some of the problems described herein.

SUMMARY

According to one aspect of the present invention, there is provided adata storage method comprising: partitioning data into an array having aplurality of data blocks, wherein each data block is a column ofelements of the data array; storing the plurality of data blocks acrossa plurality of storage nodes such that each storage node stores at leastone of the data blocks; encoding a plurality of parity blocks based onthe data array by: performing a shift operation on the data array toproduce a shifted array comprising a plurality of rows, each row havingthe elements of a diagonal of the data array; and performing anexclusive OR (XOR) operation on the elements in each row of the shiftedarray to produce a parity block, wherein the method further comprises:storing the parity blocks across a plurality of the storage nodes,wherein decoding at least some of the parity blocks permits at least aportion of the data array to be recovered in the event that at leastsome of the data blocks are not accessible.

In some embodiments, the plurality of storage nodes comprise at leastone storage node which is in the cloud.

In some embodiments, the method further comprises: partitioning the datainto an array having a greater number of data blocks than the number ofstorage nodes; grouping the data blocks into a plurality of data blockgroups, wherein each data block group consists of a plurality of thedata blocks; and storing each data block group across a plurality of thestorage nodes, such that the data blocks of each data block group arestriped across a plurality of the storage nodes.

In some embodiments, the method further comprises: encoding a parityblock based on the data blocks in each data block group.

In some embodiments, encoding the plurality of parity blocks (P) basedon the data array (X) comprises performing a multiplication operation inaccordance with this equation:

${\begin{bmatrix}I_{d \times d} \\Q\end{bmatrix} \times W^{T}} = {{\begin{bmatrix} & & & I_{d \times d} & \\1 & 1 & 1 & \ldots & 1 \\2^{d - 1} & 2^{d - 2} & 2^{d - 3} & \ldots & 1 \\1 & 2^{1} & 2^{2} & \ldots & 2^{d - 1} \\2^{2 \times {({d - 1})}} & 2^{2 \times {({d - 2})}} & 2^{2 \times {({d - 3})}} & \ldots & 1 \\1 & 2^{2} & 2^{4} & \ldots & 2^{2 \times {({d - 1})}} \\ \vdots & \vdots & \vdots & \vdots & \vdots \end{bmatrix}_{{({d + p})} \times d} \times \begin{bmatrix}X_{0} \\X_{1} \\X_{2} \\\ldots \\X_{d‐1}\end{bmatrix}_{d \times 1}} = \lbrack \text{⁠}\begin{matrix}X_{0} \\X_{1} \\X_{2} \\\ldots \\X_{d‐1} \\P_{0} \\P_{1} \\P_{2} \\P_{3} \\ \vdots \\P_{p - 1}\end{matrix} \rbrack}$

In some embodiments, encoding the plurality of parity blocks utilisesonly XOR operations.

In some embodiments, each data block and each parity block isrepresented by a polynomial with each element being a coefficient of thepolynomial.

In some embodiments, the method further comprises: encrypting at leastone of the data blocks using an encryption key.

In some embodiments, the method further comprises: compressing at leastone of the data blocks.

In some embodiments, the method comprises performing the XOR operationssimultaneously in parallel across a plurality of processing devices.

According to another aspect of the present invention, there is provideda method for recovering data from a data array in the event that thedata array is inaccessible, wherein the method comprises:

-   -   a) receiving a plurality of parity blocks which at least partly        correspond to the data array;    -   b) selecting a candidate element of the data array for recovery;    -   c) identifying at least one diagonal slope between the candidate        element and at least one adjacent element in the data array;    -   d) selecting a parity block from the plurality of parity blocks        which corresponds to the identified diagonal slope; and    -   e) processing the selected parity block by performing an XOR        operation on the selected parity block to recover the data of        the candidate element from the selected parity block.        In some embodiments, the method further comprises:    -   f) repeating operations b)-e) for each element in the data array        until all data in the data array is recovered.

In some embodiments, the method further comprises:

using at least some of the parity blocks (P) to recover the data array(X) by performing a multiplication operation in accordance with thisequation:

Q ′ - 1 × Y T = [ X 0 X 1 X 2 … X d ⁢ ‐ ⁢ 1 ]where Y^(T) is the column vector consisting of the d available blocksfrom the set of data and parity blocks {X₀, X₁, . . . , X_(d), P₀, P₁, .. . , P_(p)}, and Q′⁻¹ is the left inverse of the matrix Q′ constructedfrom the matrix

$\begin{bmatrix}I_{d \times d} \\Q\end{bmatrix},$used in the encoding process, by selecting the d rows corresponding toavailable blocks.

In some embodiments, processing the selected parity block utilises onlyXOR operations.

In some embodiments, the method comprises performing the XOR operationssimultaneously in parallel across a plurality of processing devices.

According to another aspect of the present invention, there is provideda data storage system comprising: a processor; and a memory, wherein thesystem is configured to: partition data into an array having a pluralityof data blocks, wherein each data block is a column of elements of thedata array; store the plurality of data blocks across a plurality ofstorage nodes such that each storage node stores at least one of thedata blocks; encode a plurality of parity blocks based on the data arrayby: performing a shift operation on the data array to produce a shiftedarray comprising a plurality of rows, each row having the elements of adiagonal of the data array; and performing an exclusive OR (XOR)operation on the elements in each row of the shifted array to produce aparity block, wherein the system is further configured to: store theparity blocks across a plurality of the storage nodes, wherein decodingat least some of the parity blocks permits at least a portion of thedata array to be recovered in the event that at least some of the datablocks are not accessible.

In some embodiments, the system further comprises: a plurality ofstorage nodes, at least one of the storage nodes being in the cloud.

In some embodiments, the system further comprises: an XOR processingmodule which is coupled to the processor, the XOR processing modulebeing configured to only execute XOR processing operations.

In some embodiments, the system further comprises: an encryption modulewhich is configured to encrypt at least one of the data blocks using anencryption key.

According to another aspect of the present invention, there is provideda system for recovering data from a data array in the event that thedata array is inaccessible, wherein the system comprises: a processor;and a memory, wherein the system is configured to:

-   -   a) receive a plurality of parity blocks which at least partly        correspond to the data array;    -   b) select the candidate element of the data array for recovery;    -   c) identify at least one diagonal slope between the candidate        element and at least one adjacent element in the data array;    -   d) select a parity block from the plurality of parity blocks        which corresponds to the identified diagonal slope; and    -   e) process the selected parity block by performing an XOR        operation on the selected parity block to recover the data of        the candidate element

from the selected parity block.

In some embodiments, the system is further configured to:

-   -   f) repeat operations b)-e) for each element in the data array        until all data in the data array is recovered.

According to another aspect of the present invention, there is provideda computer-readable medium storing executable instructions which, whenexecuted by a computing device, cause the computing device to: partitiondata into an array having a plurality of data blocks, wherein each datablock is a column of elements of the data array; store the plurality ofdata blocks across a plurality of storage nodes such that each storagenode stores at least one of the data blocks; encode a plurality ofparity blocks based on the data array by: performing a shift operationon the data array to produce a shifted array comprising a plurality ofrows, each row having the elements of a diagonal of the data array; andperforming an exclusive OR (XOR) operation on the elements in each rowof the shifted array to produce a parity block, wherein the system isfurther configured to: store the parity blocks across a plurality of thestorage nodes, wherein decoding at least some of the parity blockspermits at least a portion of the data array to be recovered in theevent that at least some of the data blocks are not accessible.

According to another aspect of the present invention, there is provideda computer-readable medium storing executable instructions which, whenexecuted by a computing device, cause the computing device to:

-   -   a) receive a plurality of parity blocks which at least partly        correspond to the data array;    -   b) select a candidate element of the data array for recovery;    -   c) identify at least one diagonal slope between the candidate        element and at least one adjacent element in the data array;    -   d) select a parity block from the plurality of parity blocks        which corresponds to the identified diagonal slope; and    -   e) process the selected parity block by performing an XOR        operation on the selected parity block to recover the data of        the candidate element from the selected parity block.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the present invention may be more readily understood,embodiments of the present invention will now be described, by way ofexample, with reference to the accompanying drawings, in which:

FIG. 1 is a schematic diagram of a storage system of some embodiments,

FIG. 2 is a schematic diagram of part of a storage system of someembodiments,

FIG. 3 is a schematic diagram showing data blocks and parity blocksstored across a plurality of storage nodes of some embodiments,

FIG. 4 is an encoding equation of some embodiments,

FIG. 5 is a data array of one example,

FIG. 6 is a table of parity blocks of one example,

FIG. 7 is a decoding equation of some embodiments,

FIG. 8 is part of a data array of one example,

FIG. 9 is part of a data array of one example,

FIG. 10 is part of a data array of one example,

FIG. 11 is part of a data array of one example,

FIG. 12 is part of a data array of one example,

FIG. 13 is part of a data array of one example,

FIG. 14 is part of a data array of one example,

FIG. 15 is part of a data array of one example,

FIG. 16 is a complete data array of one example,

FIG. 17 is a diagram illustrating a decoding operation of someembodiments,

FIG. 18 is a diagram illustrating a decoding operation of someembodiments, and

FIG. 19 is a diagram illustrating a decoding operation of someembodiments.

DETAILED DESCRIPTION

Aspects of the present disclosure are best understood from the followingdetailed description when read with the accompanying figures. It isnoted that, in accordance with the standard practice in the industry,various features are not drawn to scale. In fact, the dimensions of thevarious features may be arbitrarily increased or reduced for clarity ofdiscussion.

The following disclosure provides many different embodiments, orexamples, for implementing different features of the provided subjectmatter. Specific examples of components, concentrations, applicationsand arrangements are described below to simplify the present disclosure.These are, of course, merely examples and are not intended to belimiting. For example, the attachment of a first feature and a secondfeature in the description that follows may include embodiments in whichthe first feature and the second feature are attached in direct contact,and may also include embodiments in which additional features may bepositioned between the first feature and the second feature, such thatthe first feature and the second feature may not be in direct contact.In addition, the present disclosure may repeat reference numerals and/orletters in the various examples. This repetition is for the purpose ofsimplicity and clarity and does not in itself dictate a relationshipbetween the various embodiments and/or configurations discussed.

In general, as the number of storage nodes in a data storage systemincreases, the mean-time-between-failures of the system dramaticallydecreases. Such systems typically employ data replication orerror-correcting codes to tolerate multiple storage node failures inorder to enhance the reliability and availability of the system. Codingtechniques can be used to ensure that storage systems become much morereliable than individual storage nodes.

In the following description, methods and systems of some embodimentsare described which use a new coding technique that can be efficientlyused for tolerating any number of storage node failures. The methods andsystems of some embodiments also allow efficient small write operations.Furthermore, the methods and systems of some embodiments do not imposelimitations on the size of a data array which is to be stored or on thelayout of parity data derived from the data array. In the methods andsystems of some embodiments, adding and removing storage nodes is simpleand efficient. The coding technique used with some embodiments onlyrequires a small, negligible amount of additional redundancy overheadbeyond the theoretically optimal amount of redundancy achieved by MDS(Minimum Distance Separable) codes. The methods and systems of someembodiments use simple exclusive OR (XOR) operations, makingimplementation easy and efficient in software and/or hardware.

The data storage system and method of some embodiments is for use withany type of data storage system. Such data storage systems are selectedfrom a group including, but not limited, to:

Redundant Arrays of Independent Disks (RAID)

RAID systems are now widespread not only across enterprise but also inmany consumer aimed storage products. RAID systems rely on codingtechniques. Thus, the system and method of some embodiments can beutilized to design and build fast, reliable, and efficient RAID storagesystems.

Distributed Data Storage Systems (e.g. Distributed File Systems)

Distributed storage system, such as the Distributed File Systems (DFS),store data and metadata over multiple locations and servers. Suchdistributed storage systems can implement the system and method of someembodiments in order to tolerate failures that might occur in differentlocations or servers.

Multi-Cloud Storage Systems

The system and method of some embodiments is configured for use with anymulti-cloud storage system where each cloud storage service in themulti-cloud storage (e.g. Dropbox™, Google Drive™, Box™, etc.) isconsidered to be a storage node. In these embodiments, the storage nodescomprise at least one storage node which is in the cloud. Implementingthe system and method of some embodiments with a multi-cloud storagesystem seeks to produce a reliable and secure cloud storage platform.

Memory Systems

Error Correcting Codes Random Access Memory (EEC RAM) is used in moderncomputing devices to provide high reliability systems. Data stored inRAM is essential for the operating system of a device to functionnormally. The error correcting coding in ECC RAM decreases the chance ofcritical system failures, such as system collapse due to errors or lossof data stored in the RAM. The system and method of some embodiments isconfigured to be implemented in ECC RAM to seek to provide more robustRAM storage and consequently more stable operating systems.

Backup and Disaster Recovery Applications

The system and method of some embodiments is configured for use withbackup and disaster recovery applications which store multiple backupcopies of data and utilize erasure codes to minimize the possibility ofdata loss.

Communication Systems

The system and method of some embodiments is configured for errordetection and correction and network coding in a communication system.

Referring to FIG. 1 of the accompanying drawings, a data storage system1 of some embodiments is a computing device or server which isconfigured to receive and process inputted data 2. The data storagesystem 1 is coupled for communication with a plurality of storage nodes3 so that the data storage system 1 can transmit data to the storagenodes 3 for the data to be stored across at least some of the storagenodes 3. As discussed above, the storage nodes 3 may be any type of datastorage. In some embodiments, the storage nodes 3 are cloud storagesystems which are connected to the data storage system 1 via a network,such as the Internet. In other embodiments, the storage nodes 3 arelocal memory, hard discs or RAM.

Referring now to FIG. 2 of the accompanying drawings, the data storagesystem 1 of some embodiments comprises a central processing unit 4 and amemory 5. The memory 5 stores executable code which is processed by thecentral processing unit 4.

The system 1 further comprises a data input module 6 which is configuredto receive data which is to be processed by the data storage system 1.The system 1 further comprises a data output module 7 which isconfigured to output data which has been processed by the system 1 tothe storage nodes 3.

The system 1 of some embodiments further comprises an XOR processingmodule 8 which is coupled to the central processing unit 4. In someembodiments, the XOR processing module 8 is implemented by executablecode which is executed by the central processing unit 4 in order toexecute XOR processing operations. In some embodiments, the XORprocessing module 8 is configured to solely perform XOR processingoperations.

Referring now to FIG. 3 of the accompanying drawings, the storagemethods and systems of some embodiments are configured to store datablocks and parity blocks across a plurality of storage nodes 3. Thisprovides redundancy to enable the data blocks to be recreated using theparity blocks in the event that one or more of the data blocks areinaccessible (e.g. due to the failure of a storage node 3).

The systems and methods of some embodiments are configured to distributethe parity blocks across a plurality of the storage nodes. In someembodiments, the parity blocks are updated with every write operation.Storing the parity blocks across a plurality of the storage nodes avoidsa processing and storage bottleneck which would occur if the parityblocks were all stored by dedicated parity storage nodes.

The system 1 of some embodiments is configured to partition data into anarray consisting of a plurality of data blocks, wherein each data blockis a column of elements of the data array. The system is configured tostore the plurality of data blocks across a plurality of storage nodessuch that each storage node stores at least one of the data blocks.

The system 1 of some embodiments is configured to encode a plurality ofparity blocks based on the data array by performing a shift operation onthe data array to produce a shifted array comprising a plurality ofrows, each row consisting of the elements of a diagonal of the dataarray. The system 1 performs an exclusive OR (XOR) operation on theelements in each row of the shifted array to produce a parity block.This configuration of the system 1 will become clear from thedescription below which describes how the system processes the dataarray to encode the parity blocks.

The system is further configured to store the parity blocks across aplurality of the storage nodes, wherein decoding at least some of theparity blocks permits at least a portion of the data array to berecovered in the event that at least some of the data blocks are notaccessible.

The system of some embodiments is configured to partition data into anarray consisting of a greater number of data blocks than the number ofstorage nodes. In these embodiments, the system is configured to groupthe data blocks into a plurality of data block groups, wherein each datablock group consists of a plurality of the data blocks. The system thenstores each data block group across a plurality of the storage nodes,such that the data blocks of each data block group are striped across aplurality of the storage nodes, as shown in FIG. 3 . The system of someembodiments is configured to encode a parity block based on the datablocks in each data block group.

The systems and methods of some embodiments utilize the coding techniquedescribed herein to seek to provide a secure, reliable, efficient, andhighly performing cloud storage system.

The system of some embodiments is configured for recovering data from adata array in the event that the data array is at least partlyinaccessible. In these embodiments, the system is configured to:

-   -   a) receive a plurality of parity blocks which at least partly        correspond to the data array;    -   b) select a candidate element of the data array for recovery;    -   c) identify at least one diagonal slope between the candidate        element and at least one adjacent element in the data array;    -   d) select a parity block from the plurality of parity blocks        which corresponds to the identified diagonal slope; and    -   e) process the selected parity block by performing an XOR        operation of array elements along the selected diagonal slope to        recover the data of the candidate

element from the selected parity block.

In some embodiments, the system is further configured to:

-   -   f) repeat operations b)-e) above for each element in the data        array until all data in the data array is recovered.

The systems and methods of some embodiments partition data usinginnovative coding techniques and then encrypt and distribute it amongmultiple cloud storage providers. This approach seeks to bring at leastsome of the following key benefits to cloud storage services:

Data Privacy:

Since each part of the data in the system is stored on a separate cloudstorage provider, there is no single cloud provider that can retrieve,use, or view the full data of a user. Furthermore, in some embodimentsall data parts and metadata are encrypted before they are sent to cloudproviders.

System Security:

In some embodiments, the system comprises an encryption module which isconfigured to encrypt at least one of the data blocks of a data arrayusing an encryption key. In some embodiments, the system is configuredto compress at least one of the data blocks in addition to or instead ofencrypting the or each data block.

Data Availability:

Efficient [d+p, d] erasure code is used such that data is partitionedinto n+t parts consisting of n data parts and t parity parts. Even if upto p providers fail or stop to provide the service for any reason, thedata can still be retrieved from any remaining d providers, whichensures data availability and reliability of the proposed file system.Erasure codes are much more space effective, cost effective andconvenient compared to duplicating all of the data on each cloudprovider. The algorithm of some embodiments seeks to provide theseimprovements in efficiency and reliability.

RAID and multi-cloud storage systems that are based on erasure codeswill always be more storage efficient and cost effective than RAID andstorage systems that are based on data replication. In addition,optimizations on coding techniques are possible and can improve theperformance of the writes/reads/data recovery operations. Thus, wheneverthe efficiency of storage space and cost are prioritized, an erasurecodes-based system will be the best option while also providing therequired performance.

The system and method of some embodiments can tolerate any number ofstorage node failures. The system and method can be extendedsystematically and easily to achieve the desired level of faulttolerance while also being efficient in read/write operations. Further,in some embodiments the encoding and decoding processes are solely ortotally based on XOR operations. This allows the proposed array codes toachieve maximum performance and run on cost effective hardware. Themethod does not impose limitations on the size of the array or thelayout of parity data. Therefore, adding and removing storage nodes issimple and efficient. These codes require a small negligible amount ofextra redundancy overhead beyond the overhead of basic MDS codes.

Reordering the Steps:

Some of steps of the disclosed algorithm depend on preceding steps,other steps do not. Therefore, a number of variations in ordering thesesteps is feasible in other embodiments.

Starting from the Bottom Row Instead of the Top Row:

In some embodiments an algorithm that starts at the bottom of themissing array is used.

Fixed Maximum Fault Tolerance:

The method and system of some embodiments utilizes a general algorithmthat can be used to tolerate any number of failures.

Other Variations:

There are variations of implementing and interpreting the same non-MDScode. For example, coding and decoding can be interpreted as matrixoperations or as polynomial arithmetic.

In some embodiment, each data or parity column is a polynomial Q(z) withthe column elements being the coefficients of the polynomial. In theseembodiments, a diagonal parity is computed by shifting the columns andperforming the XOR operations. Shifting a column corresponds to Q(z) bys positions can be achieved by multiplying Q(z) by z^(s).

General:

The coding method of some embodiments is general and can tolerate anynumber of failing storage nodes. The tolerance is not limited to aspecific number of nodes.

Easily Extensible:

The extension of the tolerance capacity of the method of someembodiments is simple and systematic in contrary to other generalerror-correcting codes which require more complex computations fortolerating more storage nodes failures.

In the proposed coding technique of some embodiments, adding more paritycolumns to tolerate more failures requires performing the same simplenon-cyclic diagonal parity but with different slopes. Thus, the methodcan be efficiently extended to tolerate any number of failures.

Efficient Reads:

A read operation requires access to only data servers if no failure hasoccurred. Further, even if node failures occurred, data parity nodes canbe retrieved to decode the unavailable data. The decoding process ofsome embodiments is fully or solely based on XOR operations which can beeasily parallelized and performed in very high speeds.

Efficient Writes:

The algorithm of some embodiments provides the ability to perform smallwrites in an effective manner. Each element in a parity block iscomputed by XORing other elements in data blocks. On a small write,instead of re-computing the new parity block from scratch, the newparity block is computed by (1) reading the old parity, (2) reading theold data block which is being written, (3) using the diagonal associatedwith the parity block to apply an XOR operation between elements of theold parity block, old data block, and new data block. Using thisapproach, a small write operation would require p+1 reads and p+1writes. Since in practice p is much smaller than d, this approach wouldenhance the small write performance.

Efficient Reconfiguration:

The coding technique of some embodiments can dynamically remove and adddata or parity storage nodes. Adding more parity nodes will only implycalculating diagonal parities of different slopes, adding or removingmore data nodes (changing the shape of the data array) only requireperforming XOR operations of the newly added data nodes with existingparity nodes.

The encoding and decoding processes which are performed in accordancewith some embodiments are described below. The processing is performedby the data storage system 1 and/or by the XOR processing module 8.

Encoding Process

The encoding process calculates parity blocks based on input datablocks. The encoding process may be represented by a matrix operation asshown in FIG. 4 of the accompanying drawings. Encoding the plurality ofparity blocks (P) based on the data array (X) comprises performing amultiplication operation in accordance with this equation (the powers of2 in matrix Q are performed mod b and the addition operation is thebitwise XOR operation).

Let D be the data array whose elements are x_(i,j). If each column ofthis data array is denoted by X_(j), then X_(j) will be a long binarynumber.

The multiplication operation will perform the encoding process of theproposed algorithm of some embodiments. The multiplication performs thenecessary shifts and the addition (XOR) calculates the parity along thediagonals formed by the shifts.

Where P₀ is the parity column that corresponds to slope 0 (horizontalparity), P₁ is the parity column that corresponds to slope 1, P₂ is theparity column that corresponds to slope−1, P₃ is the parity column thatcorresponds to slope 2, P₃ is the parity column that corresponds toslope−2 and so on.

The encoding process of some embodiments is described more generally asfollows.

Let W be a two dimensional array of size b×d that represent the datablocks. P is a two dimensional array of size p×d that represent parityblocks, where:

b=number of elements in a data block

d=number of data blocks in the data array

p=number of parity blocks in the parity array P

-   -   To compute the first parity block P₀, use the simple horizontal        parity.    -   To compute the second and third parity blocks P₁ and P₂, use        diagonal parity of slopes +1 and −1, respectively.    -   To compute the fourth and fifth parity blocks P₃ and P₄, use        diagonal parity of slopes +2 and −2, respectively.    -   To compute the parity column P_(x), if x is even then the        diagonal slope should be

${- \frac{x}{2}},$else the slope should be

$\frac{x + 1}{2}.$The size of the parity column which is calculated using slope s isb+|s|(d−1).Encoding Example

Consider the simple b×d data array W shown in FIG. 5 of the accompanyingdrawings.

To be able to tolerate a five column erasure from the data array W, fiveparity blocks are stored. The parity blocks are calculated using theencoding process described above. The XOR operations to produce theparity blocks are shown in the parity matrix in FIG. 6 of theaccompanying drawings.

Decoding Process

The decoding process reconstructs the data blocks by using at least someof the parity blocks. Reconstructing n missing blocks requires the useof n parity blocks. The decoding process may be represented by a matrixoperation as shown in FIG. 7 of the accompanying drawings.

The method of some embodiments uses at least some of the parity blocks(P) to recover the data array (X) by performing a multiplicationoperation in accordance with the equation shown in FIG. 7 , where Y^(T)is the column vector consisting of the d available blocks from the setof data and parity blocks {X₀, X₁, . . . , X_(d), P₀, P₁, . . . ,P_(p)}, and Q′⁻¹ is the left inverse of the matrix Q′ constructed fromthe matrix

$\begin{bmatrix}I_{d \times d} \\Q\end{bmatrix},$used in the encoding process, by selecting the d rows corresponding toavailable blocks. In performing the matrix multiplication, the bitwiseXOR operation is used for the addition operation.

The multiplication operation shown in FIG. 7 performs the decodingprocess of the proposed algorithm of some embodiments. The original datablocks [X₀ . . . X_(d-1)] can be calculated through the equation bycalculating an inverse and then performing a matrix multiplication.

The decoding process of some embodiments is described more generally asfollows.

Let X be the matrix of missing columns.

Let S be an array of the slopes that correspond to the available paritycolumns sorted in descending order.

Decoding Algorithm for Contiguous Lost Data Columns:

1. Compute the Upper Left Triangle of X:

Defining the Upper Left Triangle:

Let S[k] be the smallest positive slope in array S at index k, the upperleft triangle consists of S[k] element in column k of matrix X,S[k]+S[k−1] elements in columns k−1 of matrix X, S[k]+S[k−1]+S[k−2] incolumn k−2 of matrix X, and so on until reaching column 0 of matrix X.In general, the upper left triangle has Σ_(i=c) ^(k)S[i] elements incolumn c.

Calculating Elements in the Upper Left Triangle:

Find the top S[j] elements of each column j such that S[j]>0 (i.e. thecolumn is associated with positive slope) by executing the followingsteps starting from row r=0 and column 0.

-   -   Compute the element X[r][j] using slope S[j]:

Computing the element X[r][j] is always possible because when r<S[j] thediagonal of slope S[j] passing through the element X[r] [j] has noelements to the right of X[r][j]. Also, all elements to the left ofX[r][j], which are on the diagonal of slope S[j] passing through X[r][j], would have already been computed from the previous iteration sinceS[j]<S[j−1]. Thus, X[r][j] will always be the only missing element alonga diagonal parity making its computation always feasible.

-   -   Perform a right-to-left-sweep using X[r][j] as a pivot:

A sweep uses the pivot element to compute an additional element of everycolumn to the right or to the left of the pivot element. For example, ifX[r][j] is the pivot element, a right to left sweep uses the diagonal ofslope S[j−1] going through the pivot to calculate the elementX[r+S[j−1]][j−1]. Then, the diagonal of slope S[j−2] going through thislast calculated element (X[r+S[j−1]][j−1]) to calculateX[r+S[j−1]+S[j−2]][j−2]. Then, the diagonal of slope S[j−3] that passesthrough this last calculated element (X[r+S[j−1]+S[j−2]][j−1]) is usedto calculate X[r+S[j−1]+S[j−2]+S[j−3]][j−3] and so on until reaching row0.

-   -   A left-to-right-sweep performs a similar task but in the other        direction (using the negative slopes.    -   Move to the next row (r=r+1)        2. Compute the Upper Right Triangle of X:

The upper-right triangle is very similar to the upper-left triangle butuses negative slopes, starts at the last column of X and moves in theopposite direction while performing left to right sweep operations.

3. Repeat the Following for Each Row r of Matrix X

-   -   If P₁ is among the available parity blocks        -   Use P₀ to compute the remaining element [r][j+1] in row r            where j is the last column index of the upper left triangle.        -   Set Left-Sweep-Pivot (LSP)=X[r][j+1]        -   Set Right-Sweep-Pivot (RSP)=X[r][j+1]    -   Else there are two pivot columns        -   Set RSP=X[r][j], where j is the last column index of the            upper left triangle        -   Set LSP=X[r][k], where k is the first column in the            upper-right triangle    -   Starting at LSP, perform a right-to-left-sweep computing an        additional element on every column to the left of the pivot (the        sweep operation is explained in step 2)    -   Starting at the RSP, perform a left-to-right-sweep computing an        additional element on every column to the right of the pivot        Generalization for Non-Contiguous Lost Data Columns:

The previous steps hold when the lost data columns are contiguous in thearray W. If the lost data column are not contiguous, the first two steps(calculating the upper left and right triangle) are slightly different:

Let the distance between two non-contiguous columns be d_(j,j+1) (i.e,d_(j,j+1) is the index of column X[j+1] in W minus the index of columnX[j] in W), it would be possible to compute d_(j,j+1)−|S[j]| elements incolumn j. Therefore, the steps to compute the upper-left triangle whenthe columns of X are not contiguous are:

Starting at column 0, repeat the following steps for every column j suchthat [j]>0:

-   -   Find the top d_(j,j+1)×|S[j]| elements of column j by executing        the following steps:        -   1. Compute the element X[r][j] using slope S[j]        -   2. Perform a right-to-left-sweep using X[r][j] as a pivot        -   3. Move to the next row (r=r+1)    -   Move to the next column (j=j+1)

Therefore, the upper-left triangle now consists of Σ_(i=c) ^(k)d_(i,i+1)×|S[i]| elements in each column c. As stated earlier, theupper-right triangle is very similar to the upper-left triangle but usesnegative slopes, starts at the last column of X and moves in theopposite direction.

Decoding Example:

Consider the data and parity arrays shown in FIG. 5 and FIG. 6 . Assumethat the data columns D0 . . . D4 are lost. The decoding process will bedone as described above according to the previously presented decodingsteps.

1. Compute the Upper Left Triangle:

Since 1 is the smallest available positive slope, the upper lefttriangle consists of 1 element in column 1 and 1+2=3 elements in column0.

The elements that form the upper left triangle are shown in FIG. 8 .

To compute the upper left triangle, we first define S, the array ofslopes of available parity blocks in descending order, S=[+2, +1, 0, −1,−2]. Notice that we need 5 parity blocks to recover the 5 unavailabledata blocks.

-   -   In column 0, compute the top S[0]=2 elements by using P₃        (corresponding to slope +2) to compute the elements shown in        FIG. 9 .    -   A sweep operation is not necessary since we are already at        column 0    -   In column 1, compute the top S[1]=1 elements by using P₁ to        compute the elements shown in FIG. 10    -   Using element x₂ as a pivot, and performing a right-to-left        sweep, the parity column that corresponds to slope S[1−1]=S[0]=2        is used to find the element at indices i=0+2, j=1−1=0 (i.e. z₁)        to compute the elements shown in FIG. 11 . Now, all elements of        the upper left triangle are found.        2. Compute the Upper Right Triangle:

The upper right triangle is calculated using an equivalent process tothe process described above for the upper left triangle.

The upper left and upper right triangles are shown in FIG. 12 .

3. For Each Row in the Matrix, Repeat the Following:

-   -   Compute the remaining element in the row (i.e. x₃) using P₀ to        compute the elements shown in FIG. 13    -   Considering x₃ as a pivot, perform right to left sweep:        -   Calculate y₂ using x₃ and the diagonal of slope 1        -   Calculate h₁ using y₂ and diagonal of slope 2 to compute the            elements shown in FIG. 14    -   Considering x₃ as a pivot, perform left to right sweep:        -   Calculate y₄ using x₃ and the diagonal of slope−1        -   Calculate h₄ using y₄ and diagonal of slope−2 to compute the            elements shown in FIG. 15

Repeat operation 3 above for the second row (i.e. by starting withcalculating y₃ and then performing the sweep operations) until allelements of matrix X are calculated, as shown in FIG. 16 .

The decoding process described above is illustrated more generally inFIGS. 17-19 of the accompanying drawings. After forming the upper leftand upper right triangles in the first operation (FIG. 17 ), the pivotelement in row 0 is computed and sweep operations are done in the secondoperation (FIG. 18 ). Then, the pivot element in row 1 is computed andsweep operations are done in the third operation (FIG. 19 ). Furtheroperations which are similar to the second and third operations (findingthe pivot and performing sweeps) are performed until all elements of thearray are found.

Performance of the Encoding the Decoding Algorithms:

Let:

b=number of words in a data block (rows in the data array)

d=number of data columns in the array

p=number of parity columns

The number of XOR operations needed to compute a parity of slope s is(d−1)×(b−|s|). Therefore, the total number of XOR operations needed tocompute p parity blocks is

$( {d - 1} ) \times ( {{bp} - \frac{p^{2} + {2p}}{4}} )$if p is even, and

$( {d - 1} ) \times ( {{bp} - \frac{p^{2} + {2p} + 1}{4}} )$if p is odd. Therefore, the number of required XOR operations is<(d−1)bp. Similarly we can show that the maximum number of XORoperations needed to decode an unavailable data block is <(d−1)b.

The foregoing outlines features of several embodiments so that those ofordinary skill in the art may better understand various aspects of thepresent disclosure. Those of ordinary skill in the art should appreciatethat they may readily use the present disclosure as a basis fordesigning or modifying other processes and structures for carrying outthe same purposes and/or achieving the same advantages of variousembodiments introduced herein. Those of ordinary skill in the art shouldalso realize that such equivalent constructions do not depart from thespirit and scope of the present disclosure, and that they may makevarious changes, substitutions, and alterations herein without departingfrom the spirit and scope of the present disclosure.

Although the subject matter has been described in language specific tostructural features or methodological acts, it is to be understood thatthe subject matter of the appended claims is not necessarily limited tothe specific features or acts described above. Rather, the specificfeatures and acts described above are disclosed as example forms ofimplementing at least some of the claims.

Various operations of embodiments are provided herein. The order inwhich some or all of the operations are described should not beconstrued to imply that these operations are necessarily orderdependent. Alternative ordering will be appreciated having the benefitof this description. Further, it will be understood that not alloperations are necessarily present in each embodiment provided herein.Also, it will be understood that not all operations are necessary insome embodiments.

Moreover, “exemplary” is used herein to mean serving as an example,instance, illustration, etc., and not necessarily as advantageous. Asused in this application, “or” is intended to mean an inclusive “or”rather than an exclusive “or”. In addition, “a” and “an” as used in thisapplication and the appended claims are generally be construed to mean“one or more” unless specified otherwise or clear from context to bedirected to a singular form. Also, at least one of A and B and/or thelike generally means A or B or both A and B. Furthermore, to the extentthat “includes”, “having”, “has”, “with”, or variants thereof are used,such terms are intended to be inclusive in a manner similar to the term“comprising”. Also, unless specified otherwise, “first,” “second,” orthe like are not intended to imply a temporal aspect, a spatial aspect,an ordering, etc. Rather, such terms are merely used as identifiers,names, etc. for features, elements, items, etc. For example, a firstelement and a second element generally correspond to element A andelement B or two different or two identical elements or the sameelement.

Also, although the disclosure has been shown and described with respectto one or more implementations, equivalent alterations and modificationswill occur to others of ordinary skill in the art based upon a readingand understanding of this specification and the annexed drawings. Thedisclosure comprises all such modifications and alterations and islimited only by the scope of the following claims. In particular regardto the various functions performed by the above described features(e.g., elements, resources, etc.), the terms used to describe suchfeatures are intended to correspond, unless otherwise indicated, to anyfeatures which performs the specified function of the described features(e.g., that is functionally equivalent), even though not structurallyequivalent to the disclosed structure. In addition, while a particularfeature of the disclosure may have been disclosed with respect to onlyone of several implementations, such feature may be combined with one ormore other features of the other implementations as may be desired andadvantageous for any given or particular application.

Embodiments of the subject matter and the functional operationsdescribed herein can be implemented in digital electronic circuitry, orin computer software, firmware, or hardware, including the structuresdisclosed in this specification and their structural equivalents, or incombinations of one or more of them.

Some embodiments are implemented using one or more modules of computerprogram instructions encoded on a computer-readable medium for executionby, or to control the operation of, a data processing apparatus. Thecomputer-readable medium can be a manufactured product, such as harddrive in a computer system or an embedded system. The computer-readablemedium can be acquired separately and later encoded with the one or moremodules of computer program instructions, such as by delivery of the oneor more modules of computer program instructions over a wired orwireless network. The computer-readable medium can be a machine-readablestorage device, a machine-readable storage substrate, a memory device,or a combination of one or more of them.

The terms “computing device” and “data processing apparatus” encompassall apparatus, devices, and machines for processing data, including byway of example a programmable processor, a computer, or multipleprocessors or computers. The apparatus can include, in addition tohardware, code that creates an execution environment for the computerprogram in question, e.g., code that constitutes processor firmware, aprotocol stack, a database management system, an operating system, aruntime environment, or a combination of one or more of them. Inaddition, the apparatus can employ various different computing modelinfrastructures, such as web services, distributed computing and gridcomputing infrastructures.

The processes and logic flows described in this specification can beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output.

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read-only memory ora random access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto-optical disks, or optical disks. However, a computerneed not have such devices. Devices suitable for storing computerprogram instructions and data include all forms of non-volatile memory,media and memory devices, including by way of example semiconductormemory devices, e.g., EPROM (Erasable Programmable Read-Only Memory),EEPROM (Electrically Erasable Programmable Read-Only Memory), and flashmemory devices; magnetic disks, e.g., internal hard disks or removabledisks; magneto-optical disks; and CD-ROM and DVD-ROM disks.

To provide for interaction with a user, some embodiments are implementedon a computer having a display device, e.g., a CRT (cathode ray tube) orLCD (liquid crystal display) monitor, for displaying information to theuser and a keyboard and a pointing device, e.g., a mouse or a trackball,by which the user can provide input to the computer. Other kinds ofdevices can be used to provide for interaction with a user as well; forexample, feedback provided to the user can be any form of sensoryfeedback, e.g., visual feedback, auditory feedback, or tactile feedback;and input from the user can be received in any form, including acoustic,speech, or tactile input.

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.Embodiments of the subject matter described in this specification can beimplemented in a computing system that includes a back-end component,e.g., as a data server, or that includes a middleware component, e.g.,an application server, or that includes a front-end component, e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described is this specification, or any combination of one ormore such back-end, middleware, or front-end components. The componentsof the system can be interconnected by any form or medium of digitaldata communication, e.g., a communication network. Examples ofcommunication networks include a local area network (“LAN”) and a widearea network (“WAN”), an inter-network (e.g., the Internet), andpeer-to-peer networks (e.g., ad hoc peer-to-peer networks).

In the present specification “comprise” means “includes or consists of”and “comprising” means “including or consisting of”.

The features disclosed in the foregoing description, or the followingclaims, or the accompanying drawings, expressed in their specific formsor in terms of a means for performing the disclosed function, or amethod or process for attaining the disclosed result, as appropriate,may, separately, or in any combination of such features, be utilised forrealising the invention in diverse forms thereof.

The invention claimed is:
 1. A data storage method comprising:partitioning data into an array consisting of a plurality of datablocks, wherein each data block of the plurality of data blocks is acolumn of elements of the data array; storing the plurality of datablocks across a plurality of storage nodes such that each storage nodestores at least one data block of the plurality of data blocks; encodinga parity array (P) comprising a plurality of parity blocks based on thedata array by: performing a matrix multiplication operation inaccordance with this equation: ${{\begin{bmatrix}I_{d \times d} \\Q\end{bmatrix} \times W^{T}} = {{\begin{bmatrix} & & & I_{d \times d} & \\1 & 1 & 1 & \ldots & 1 \\2^{d - 1} & 2^{d - 2} & 2^{d - 3} & \ldots & 1 \\1 & 2^{1} & 2^{2} & \ldots & 2^{d - 1} \\2^{2 \times {({d - 1})}} & 2^{2 \times {({d - 2})}} & 2^{2 \times {({d - 3})}} & \ldots & 1 \\1 & 2^{2} & 2^{4} & \ldots & 2^{2 \times {({d - 1})}} \\ \vdots & \vdots & \vdots & \vdots & \vdots \end{bmatrix}_{{({d + p})} \times d} \times \begin{bmatrix}X_{0} \\X_{1} \\X_{2} \\\ldots \\X_{d‐1}\end{bmatrix}_{d \times 1}} = \lbrack \text{⁠}\begin{matrix}X_{0} \\X_{1} \\X_{2} \\\ldots \\X_{d‐1} \\P_{0} \\P_{1} \\P_{2} \\P_{3} \\ \vdots \\P_{p - 1}\end{matrix} \rbrack}},$ where: I_(d×d) is the identity matrix inwhich all the elements of the principal diagonal are 1 and all otherelements are zero; d is the number of data blocks in the data array; andp is the number of parity blocks; wherein the matrix multiplicationoperation performs: an arithmetic multiplication to perform a shiftoperation on the data array to produce a shifted array comprising aplurality of rows, each row having the elements of a diagonal of thedata array; and an addition operation comprising performing a bitwiseexclusive OR (XOR) operation on the elements in each row of the shiftedarray to produce a parity block, wherein the method further comprises:storing the parity blocks across a plurality of the storage nodes,wherein decoding at least some of the parity blocks permits at least aportion of the data array to be recovered in the event that at leastsome of the data blocks of the plurality of data blocks are notaccessible.
 2. The method of claim 1, wherein the plurality of storagenodes comprise at least one storage node connected via a network.
 3. Themethod of claim 1, wherein the method further comprises: partitioningthe data into an array having a greater number of data blocks of theplurality of data blocks than the number of storage nodes; grouping thedata blocks of the plurality of data blocks into a plurality of datablock groups, wherein each data block group consists of a plurality ofthe data blocks; and storing each data block group across a plurality ofthe storage nodes, such that the data blocks of each data block groupare striped across a plurality of the storage nodes.
 4. The method ofclaim 3, wherein the method further comprises: encoding a parity blockbased on the data blocks in each data block group.
 5. The method ofclaim 1, wherein encoding the plurality of parity blocks utilises onlyXOR operations.
 6. The method of claim 1, wherein each data block andeach parity block is represented by a polynomial with each element beinga coefficient of the polynomial.
 7. The method of claim 1, wherein themethod further comprises: encrypting at least one data block of theplurality of data blocks using an encryption key.
 8. The method of claim1, wherein the method further comprises: compressing at least one datablock of the plurality of data blocks.
 9. The method of claim 1, whereinthe method comprises performing the XOR operations simultaneously inparallel across a plurality of processing devices.
 10. A data storagesystem comprising: a processor; and a memory, wherein the data storagesystem is configured to: partition data into an array having a pluralityof data blocks, wherein each data block of the plurality of data blocksis a column of elements of the data array; store the plurality of datablocks across a plurality of storage nodes such that each storage nodestores at least one of the data blocks of the plurality of data blocks;encode a parity array (P) comprising a plurality of parity blocks basedon the data array by: performing a matrix multiplication operation inaccordance with this equation: ${\begin{bmatrix} & & & I_{d \times d} & \\ & & & & \\1 & 1 & 1 & \ldots & 1 \\2^{d - 1} & 2^{d - 2} & 2^{d - 3} & \ldots & 1 \\1 & 2^{1} & 2^{2} & \ldots & 2^{d - 1} \\2^{2 \times {({d - 1})}} & 2^{2 \times {({d - 2})}} & 2^{2 \times {({d - 3})}} & \ldots & 1 \\1 & 2^{2} & 2^{4} & \ldots & 2^{2 \times {({d - 1})}} \\ \vdots & \vdots & \vdots & \vdots & \vdots \end{bmatrix}_{{({d + p})} \times d} \times \begin{bmatrix}X_{0} \\X_{1} \\X_{2} \\\ldots \\X_{d‐1}\end{bmatrix}_{d \times 1}} = \begin{bmatrix}X_{0} \\X_{1} \\X_{2} \\\ldots \\X_{d‐1} \\P_{0} \\P_{1} \\P_{2} \\P_{3} \\ \vdots \\P_{p‐1}\end{bmatrix}$ where: I_(d×d) is the identity matrix in which all theelements of the principal diagonal are 1 and all other elements arezero; d is the number of data blocks in the data array; and p is thenumber of parity blocks; wherein the matrix multiplication operationperforms: an arithmetic multiplication to perform a shift operation onthe data array to produce a shifted array comprising a plurality ofrows, each row having the elements of a diagonal of the data array; andan addition operation comprising performing a bitwise exclusive OR (XOR)operation on the elements in each row of the shifted array to produce aparity block, wherein the data storage system is further configured to:store the parity blocks across a plurality of the storage nodes, whereindecoding at least some of the parity blocks permits at least a portionof the data array to be recovered in the event that at least some of thedata blocks of the plurality of data blocks are not accessible.
 11. Thedata storage system of claim 10, wherein the data storage system furthercomprises: a plurality of storage nodes, at least one of the storagenodes being connected via a network.
 12. The data storage system ofclaim 10, wherein the data storage system further comprises: an XORprocessing module which is coupled to the processor, the XOR processingmodule being configured to only execute XOR processing operations. 13.The data storage system of claim 10, wherein the data storage systemfurther comprises: an encryption module which is configured to encryptat least one of the data blocks of the plurality of data blocks using anencryption key.